package com.cos.lession70.entity;

import java.util.*;

/**
 * @author: COS
 * @time: 2022/9/26 11:50
 * @description:
 */
public class User {
    private String name;
    private int age;
    private String sex;
    private Date bornDate;
    private String[] hobby;
    private List<String> address = new ArrayList<>();
    private Set<String> phones = new HashSet<>();
    private Map<String, String> huaming = new HashMap<>();
    private Address addr;

    public Address getAddr() {
        return addr;
    }

    public void setAddr(Address addr) {
        this.addr = addr;
    }

    public void destory (){
        System.out.println("销毁了");
    }

    public void init(){
        System.out.println("被创建啦");
    }


    @Override
    public String toString() {
        return "User{" +
                "name='" + name + '\'' +
                ", age=" + age +
                ", sex='" + sex + '\'' +
                ", bornDate=" + bornDate +
                ", hobby=" + Arrays.toString(hobby) +
                ", address=" + address +
                ", phones=" + phones +
                ", huaming=" + huaming +
                ", addr=" + addr +
                '}';
    }

    public Date getBornDate() {
        return bornDate;
    }

    public void setBornDate(Date bornDate) {
        this.bornDate = bornDate;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public String getSex() {
        return sex;
    }

    public void setSex(String sex) {
        this.sex = sex;
    }

    public String[] getHobby() {
        return hobby;
    }

    public void setHobby(String[] hobby) {
        this.hobby = hobby;
    }

    public List<String> getAddress() {
        return address;
    }

    public void setAddress(List<String> address) {
        this.address = address;
    }

    public Set<String> getPhones() {
        return phones;
    }

    public void setPhones(Set<String> phones) {
        this.phones = phones;
    }

    public Map<String, String> getHuaming() {
        return huaming;
    }

    public void setHuaming(Map<String, String> huaming) {
        this.huaming = huaming;
    }
}
